/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved.
 * Description: remote rdma rma buffer implement
 */

#ifndef REMOTE_RDMA_RMA_BUFFER_IMPL_H
#define REMOTE_RDMA_RMA_BUFFER_IMPL_H

#include "hccl_common.h"
#include "hccl_network_pub.h"
#include "rma_buffer.h"
#include "mem_name_repository_pub.h"

namespace hccl {
class RemoteRdmaRmaBufferImpl : public RmaBuffer {
public:
	RemoteRdmaRmaBufferImpl();

	HcclResult Deserialize(const std::string& msg);

    ~RemoteRdmaRmaBufferImpl();

    RemoteRdmaRmaBufferImpl(const RemoteRdmaRmaBufferImpl &that) = delete;
    RemoteRdmaRmaBufferImpl &operator=(const RemoteRdmaRmaBufferImpl &that) = delete;

    inline u32 GetKey() const
    {
        return rkey;
    }

private:
    u32         rkey{0};
};
}
#endif //  REMOTE_RDMA_RMA_BUFFER_IMPL_H